package day6;

// 实体类
// java是一个单继承的语言：Student extends Person
// 一个类不继承任何一个父类，默认继承 extends Object
// Object是所有类的父类
public class Person/* extends Object */{
	protected int id;
	protected String name;
	protected int age;

	public Person() {
		// new Object(), 这个super()可以不用写，你不写java会帮你加上，你写了，
		// java就不给你加了
		// super();
	}

	public Person(int id, String name, int age) {
		// super();// new Object()
		this.id = id;
		this.name = name;
		this.age = age;
	}

	public void show() {
		System.out.println("id是" + id + "的" + name);
	}
	
	void show(int a, char b, double c){}
	// Duplicate method show(int, char, double) in type Person
	// void show(int x, char y, double z){}
	int show(int a, double c, char b){return 0;}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	@Override
	public String toString() {
		return "Person [id=" + id + ", name=" + name + ", age=" + age + "]";
	}

}
